<template>
  <div class="home">
    <iframe width="100%" :height="height" :src="videoSrc" allowtransparency="true" scrolling="no" allowfullscreen=""
      frameborder=0></iframe>
  </div>
</template>
<script>
  export default {
    name: 'Home',
    data() {
      return {
        height: document.documentElement.clientHeight - 52,
        videoSrc: 'https://z1.m1907.cn/?jx',
      }
    },
    mounted() {
      const lineSrc = this.$route.query.lineSrc
      const couponId = this.$route.query.video
      if (lineSrc != '' && lineSrc != null) this.videoSrc = lineSrc + couponId

      // 实时获取浏览器宽度高度
      let that = this
      window.onresize = () => {
        return (() => {
          window.fullHeight = document.documentElement.clientHeight
          window.fullWidth = document.documentElement.clientWidth
          that.height = window.fullHeight - 52 // 高
          // that.windowWidth = window.fullWidth // 宽
        })()
      }
    },
  }
</script>